<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.gfa4j.wef.taglib.CommonTagUtils"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://www.gillion.com.cn/wef-tags" prefix="g"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!--###-->
<input id="${selectId}currPageId" type="hidden" value="${currPage }" />
<input id="${selectId}totalPageId" type="hidden" value="${totalPage}" />
<input id="${selectId}totalNumId" type="hidden" value="${totalNum}" />
<input type="hidden" value="" />
<div id="${selectId}gridId" class="eXtremeTable" style="position:relative;z-index:999;border-style:solid; border-color:#000000; border-width:0px;table-layout:fixed;" >
	<table id="${selectId}AutoSelectTableId"  border="0" title="<%=CommonTagUtils.getMessage("wef.tag.combox.autoselect.table.tip") %>" cellspacing="0"  cellpadding="0"  class="tableRegion"  style="BORDER-COLLAPSE: collapse;text-overflow:ellipsis;word-break:keep-all"  width="100%" >
		<thead>
			<tr>
				<td class="statusBarSelect" colspan="${fn:length(cols)}">
					<table width="100%">
						<tr>
							<td width="70%"><c:if test="${totalNum!=0}">
									<g:label text="wef.tag.combox.autoselect.find" showColon="false" /> ${totalNum} <g:label text="wef.tag.combox.autoselect.totalResults" showColon="false" />
									<g:label text="wef.tag.combox.autoselect.display" showColon="false" /> ${(currPage-1) * pageSize+1} <g:label text="wef.tag.combox.autoselect.to" showColon="false" />
									<c:if test="${currPage * pageSize >= totalNum}"> ${totalNum}</c:if>
									<c:if test="${currPage * pageSize < totalNum}"> ${currPage * pageSize}</c:if>
								</c:if> <c:if test="${totalNum==0}">
									<g:label text="wef.tag.combox.autoselect.recordEmpty" showColon="false" />
								</c:if>
							</td>
							<td>
								<!-- firstPageDisabled.gif -->
								<table width="100%">
									<tr>
										<td><img id="${selectId}firstPage" src="${ctx}/scripts/widgets/autoSelect/images/firstPage.gif" style="border: 0pt none; cursor: pointer" title="第一页" alt="第一页" /></td>
										<td><img id="${selectId}prevPage" src="${ctx}/scripts/widgets/autoSelect/images/prevPage.gif" style="border: 0pt none; cursor: pointer" title="上一页" alt="上一页" /></td>
										<td><img id="${selectId}nextPage" src="${ctx}/scripts/widgets/autoSelect/images/nextPage.gif" style="border: 0pt none; cursor: pointer" title="下一页" alt="下一页" /></td>
										<td><img id="${selectId}lastPage" src="${ctx}/scripts/widgets/autoSelect/images/lastPage.gif" style="border: 0pt none; cursor: pointer" title="最后页" alt="最后页" /></td>
										<td><input id="${selectId}gotoPageInput" value="${currPage}" maxlength="3" type="text" style="width: 24px; height: 18px; font-size: 12px" /></td>
										<td><img id="${selectId}gotoPage" src="${ctx}/scripts/widgets/autoSelect/images/go.gif" style="border: 0pt none; cursor: pointer" alt="转到" title="转到" height="15" width="14" /></td>
									</tr>
								</table>
							</td>
						</tr>
					</table></td>
			</tr>
			<tr>
				<c:forEach items="${cols}" var="col">
					<td class="tableHeader" title="${col}">${col}</td>
				</c:forEach>
			</tr>
		</thead>

		<tbody class="tableBody" >
		<c:forEach items="${records}" var="record">
			<tr class="odd" id="autoSelectTr"  onmouseover="this.className='autoHighlight';var selectArray = new Array();
				<c:forEach items="${record}" var="item" >selectArray.push('${item}');
				</c:forEach>this.record=selectArray;"  onmouseout="this.className='odd'" >
				<c:forEach items="${record}" var="item" begin="1" varStatus="status">
					<td><div title="${item}" style="width:${colWidths[status.index-1]}" class="EcTableColumnEllipsis">${item}</div></td>
				</c:forEach> 
			</tr>
		</c:forEach>
	</tbody>
</table>
</div>
<iframe frameborder="0" src="javascript:false" style="position:absolute; top:0px; left:0px; width:1000px; height:1000px; z-index:-1;"></iframe>
